package com.xmut.service.impl;

import com.xmut.mapper.SAMapper;
import com.xmut.pojo.Sv;
import com.xmut.service.SAService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author zhangbaiyan
 * @date 2024-05-26 02:17
 * @description:
 * @version:
 */
@Service
public class SAServiceImpl implements SAService {
    @Autowired
    private SAMapper saMapper;

    @Override
    public void add(Sv service) {
    service.setTime(LocalDateTime.now());
    saMapper.insert(service);
    }

    @Override
    public List<Sv> getAll() {
        return saMapper.getAll();
    }

    @Override
    public void delServiceById(Integer id) {
        saMapper.delServiceById(id);
    }
}
